package fr.afcepf.atod19.voyage.facade;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import fr.afcepf.atod19.voyage.entities.Voyage;
import fr.afcepf.atod19.voyage.service.interfaces.IServiceVoyage;

@Component
@Transactional
public class FacadeAdminGestionVoyage {
	

	@Autowired
	private IServiceVoyage serviceVoyage;
	
	
	public IServiceVoyage getServiceVoyage() {
		return serviceVoyage;
	}


	public void setServiceVoyage(IServiceVoyage serviceVoyage) {
		this.serviceVoyage = serviceVoyage;
	}

	public Voyage creerUnVoyage(Voyage v) {
		return serviceVoyage.creerUnVoyage(v);
	}
	
	public boolean supprimerUnVoyage(Voyage v){
		return serviceVoyage.supprimerUnVoyage(v);
	}
	
	public List<Voyage> rechercherVoyage(Voyage v) {
		return serviceVoyage.rechercherVoyage(v);
	}
	
	public Voyage consulterUnVoyage(int numVoyage) {
		return serviceVoyage.consulterUnVoyage(numVoyage);
	}
	

}
